//
//  BaseViewController.swift
//  WineComing
//
//  Created by xiaozhi on 15/8/3.
//  Copyright (c) 2015年 xiaozhi. All rights reserved.
//

import UIKit

class BaseViewController: UIViewController {
    var processView:ProcessView!
    override func viewDidLoad() {
        super.viewDidLoad()
        view.backgroundColor = commonBackgoundColor
        self.automaticallyAdjustsScrollViewInsets = false
        processView = ProcessView(customView: view)
        view.addSubview(processView)
        processView.hiddenProcessView(false)
        // Do any additional setup after loading the view.
    }
    override func viewWillAppear(animated: Bool) {
        super.viewWillAppear(animated)
        UIApplication.sharedApplication().statusBarHidden = false
        //        beforePriceLabel.addColorWithreallySize()
    }
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    func showTips(message:String?){
        view.showFlashTips(message!)
    }
    func showLongTips(message:String?){
//        processView.showLongTimeMessage(message)
    }
    func showTips(message:String,whenDone:dispatch_block_t){
        view.showTips(message, whenDown: whenDone)
    }
    func showProcess(message:String?){
        view.showLoadingTip(message!)
    }
    func hiddenProcessView(){
        view.hideHub()
    }
    deinit{
        self.hiddenProcessView()
    }
    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
